package web.util;

import org.jsoup.Jsoup;
import org.jsoup.safety.Whitelist;

/**
 * Created by Administrator on 2014/12/16.
 */
public class FormText {
    public static String text(String str){
        return  str.trim().replace("&gt;","").replace("&lt;","");

    }
    public static String getContentText(String content){
        content = content.replace("\n","<br />");
        Whitelist whitelist = new Whitelist();
        whitelist.addTags("br");
        content = Jsoup.clean(content, whitelist);
        content = content.replace("<br />  \n","").replace("<br />","").replace(": \n",":").replace("： \n","：").replace(":\n",":").replace("：\n","：");
        return content;
    }
}
